module.exports = function(app) {

    var isLoggedIn = require('../app/util/authUtil').isLoggedIn;
    var upgradeProjectController = require('../app/controller/upgradeProjectController');

    /**
     * 首页
     */
    app.get('/upgradeProject', isLoggedIn);
    app.get('/upgradeProject', function(req, res) {
        res.render('upgradeProject/index');
    });

    /**
     * 查询
     */
    app.post('/upgradeProject/query', isLoggedIn);
    app.post('/upgradeProject/query', function(req, res) {
        upgradeProjectController.query(req, res);
    });

    /**
     * 修改
     */
    app.get('/upgradeProject/edit', isLoggedIn);
    app.get('/upgradeProject/edit', function(req, res) {
        upgradeProjectController.edit(req, res);
    });

    /**
     * 保存
     */
    app.post('/upgradeProject/save', isLoggedIn);
    app.post('/upgradeProject/save', function(req, res) {
        upgradeProjectController.save(req, res);
    });

    /**
     * 删除
     */
    app.post('/upgradeProject/remove', isLoggedIn);
    app.post('/upgradeProject/remove', function(req, res) {
        upgradeProjectController.remove(req, res);
    });

}
